package com.jctrip.hotel.management.model.param;

import com.jctrip.hotel.management.model.result.GetAllPricePolicyResult;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@ApiModel(value = "修改价格政策接口-请求体")
@Data
public class UpdatePricePolicyParam {
    @ApiModelProperty(value = "主键id", required = true)
    private String id;

    @ApiModelProperty(value = "政策编号", required = true)
    private String pricePolicyId;

    @ApiModelProperty(value = "政策编码", required = true)
    private String pricePolicyCode;

    @ApiModelProperty(value = "价格政策名称", required = true)
    private String pricePolicyName;

    @ApiModelProperty(value = "供应来源", required = true)
    private String sourceCode;

    @ApiModelProperty(value = "供应商账户id，逗号分隔", required = true)
    private String sourceIds;

    @ApiModelProperty(value = "投放渠道编号", required = true)
    private String routeId;

    @ApiModelProperty(value = "价格政策状态(0=关闭；1=开启)", required = true)
    private Integer pricePolicyStatus;

    @ApiModelProperty(value = "支付类型(1=预付；2=现付；3=信用类后付)", required = true)
    private Integer paymentType;

    @ApiModelProperty(value = "供应价格码", required = true)
    private String productCode;

    @ApiModelProperty(value = "早餐数量", required = true)
    private Integer breakfastCount;

    @ApiModelProperty(value = "容差金额", required = true)
    private BigDecimal tolerancePrice;

    @ApiModelProperty(value = "溢价区间列表", required = true)
    private List<PricePolicyRangeInfo> pricePolicyRangeInfoList;

    @ApiModelProperty(value = "下单key", required = true)
    private List<GetAllPricePolicyResult.KeyInfo> keyInfos;

    @ApiModel(value = "价格政策对象")
    @Data
    @Builder
    public static class PricePolicyRangeInfo{
        @ApiModelProperty(value = "价格区间最低值")
        private BigDecimal rangePriceMin;

        @ApiModelProperty(value = "价格区间最高值")
        private BigDecimal rangePriceMax;

        @ApiModelProperty(value = "加价率(0.05等于溢价5%)")
        private BigDecimal markupRate;

        @ApiModelProperty(value = "固定加价金额")
        private BigDecimal markupFixed;
    }
}
